﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Chaos.model
{
    public class powermarker : INotifyPropertyChanged, stream.streamable
    {
        public event PropertyChangedEventHandler PropertyChanged;
        protected void Notify(string property)
        {
            if (this.PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        }

        private int m_power;
        public int Power
        {
            get { return m_power; }
            set
            {
                if (m_power != value)
                {
                    m_power = value;
                    Notify("Power");
                }
            }
        }

        public virtual void serialize(stream.stream io_Stream)
        {
            io_Stream.begin("powermarker")
                .serialize("Power", ref m_power)
            .end();
        }
    }
}
